package com.huang.strategic.v1;

import java.math.BigDecimal;

/**
 * <p>打折</p>
 *
 * @author aneng huang
 * @since 2020-10-27 15:18:53
 */
public class CashierRebate implements CashierSuper {

    private double rebate = 1;

    public CashierRebate(String discount) {
        this.rebate = new BigDecimal(discount).doubleValue();
    }


    @Override
    public double acceptCash(double money) {
        return money * rebate;
    }
}
